package com.lq.ecoldchain.ui.mine.carInfo

import org.kodein.di.Kodein
import org.kodein.di.android.support.AndroidLifecycleScope
import org.kodein.di.generic.bind
import org.kodein.di.generic.instance
import org.kodein.di.generic.scoped
import org.kodein.di.generic.singleton

/*
*2018/12/28 0028  13:12
*function by lq
*/
val carKodeinModule =Kodein.Module("Car_Info_Kodein_Module"){
    bind<CarInfoViewModel>() with scoped(AndroidLifecycleScope).singleton {
        CarInfoViewModel()
    }

    bind<CarInfoDelegate>() with scoped(AndroidLifecycleScope).singleton {
        CarInfoDelegate(
                viewModel = instance()
        )
    }
}